package com.soft.link.controller.tsystem;

import com.alibaba.fastjson.JSONObject;
import com.soft.link.model.TsUser;
import com.soft.link.service.TsUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.Map;

/**
 * company 重庆庆云石油工程技术有限责任公司
 * FileName SUserController
 * Package com.soft.link.controller.suser
 * Description 账号管理
 * author Administrator
 * create 2018-03-24 22:46
 * version V1.0
 */
@Controller
@RequestMapping("system/tsUser")
public class TSUserController {

    @Autowired(required = false)
    private TsUserService tsUserService ;

    /**
    * @methodname listSUser
    * @Description 进入人员列表界面
    * @author 黄学乾
    * @create 2018/4/4/004 18:35
    * @param  * @param
    * @throws {如果有异常说明请填写}
    * @return
    */
    @RequestMapping("listSUser")
    public ModelAndView listSUser(){
        ModelAndView listSUser = new ModelAndView("tsystem/tsuser/listTsUser");
        return listSUser ;
    }

    /**
    * @methodname
    * @Description {填写方法注释说明}
    * @author 黄学乾
    * @create 2018/3/24/024 22:58
    * @param  * @param sUser
    * @throws {如果有异常说明请填写}
    * @return 
    */
    @RequestMapping("ajaxListSUser")
    @ResponseBody
    public Map<String, Object> ajaxListSUser(TsUser tsUser) {
        JSONObject listSUser = new JSONObject();
        try {
            listSUser = tsUserService.findTsUserPage(tsUser);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return listSUser;
    }
}
